package owndemo;

import javafx.beans.binding.ObjectExpression;

import java.io.Serializable;

public class Teacher  extends  Person implements Serializable,Comparable {
    private static int counter=100;
    public static void test(){
        System.out.println("teacher static test");
    }
    public String name;
    public int  age;
    private double salary;

    //重载构造函数
    public Teacher(){}

    private Teacher(String name, int age, double salary) {
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    public  void eat(String something){

        System.out.println("老师在吃"+something);
    }
    public void eat(String something,int time){
        System.out.println("老师在吃"+something+"吃了"+time+"小时");

    }

    private  static final String concat(int i,double b,char c,boolean d){
        return ""+i+d+c+b;
    }

    //重写toString方法
    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", salary=" + salary +
                '}';
    }
    //重写接口Comparable
    @Override
    public int compareTo(Object o) {

        return 0;
    }

}